module.exports = {

    /**
   * Application configuration section
   * http://pm2.keymetrics.io/docs/usage/application-declaration/
   */
    apps: [{
        name: "API",
        script: "index.js",
        env: {COMMON_VARIABLE: "true"},
        env_production: {NODE_ENV: "production"}
    }],

    /**
   * Deployment section
   * http://pm2.keymetrics.io/docs/usage/deployment/
   */
    deploy: {
        production: {
            user: "root",
            host: "106.15.179.107",
            ref: "origin/master",
            repo: "https://gitee.com/lilihao/testpm2.git",
            path: "/opt/hifox/testpm2",
            "post-deploy": "export PATH=/opt/node/bin:$PATH && npm install && pm2 startOrRestart ecosystem.config.js --env production"
        }
    }
}
